<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<header th:replace="~{common/head :: header}"></header>
<body>
<div>
	欢迎登录，<span th:text="${hello}"></span>！
	<button onclick="ajaxDemo()">ajaxDemo</button>
</div>
</body>
<!-- 全局js -->
<script th:src="@{/js/jquery.min.js}"></script>
<script>
	function ajaxDemo(){
		$.ajax({
			type:"GET",
			url:"/learn/user",
			dataType:"json",
			success:function(data){
				console.log(data)
				console.log(data.length)
			},
			error:function(jqXHR){
				alert("error");
			}
		});
	}
</script>
</html>